#ifndef PACKAGE_H
#define PACKAGE_H
#include <QString>
#include <QList>
#include<QMap>
namespace Package {
typedef struct
{
    QString name;
    QString passwd;
    QString check_str;
    QString phone_num;
}RegisterRequestSend;
typedef struct
{
    QString phone_num;
}ChecknumRequestSend;

typedef struct
{
    QString uid_me;
    QString passwd;
}LoginRequestSend;
typedef struct
{

    QString uid_me;
    QString isGroup;
    QList<QString> uid_friends;
}AddAssociationSend;
typedef struct
{
    QString uid_friend;
    QString uid_me;
}AddFriendRequestSend;
typedef struct
{

    QString uid_me;
    QString uid_group;
    int data_len;
    QString msg;
}MessageSend;

typedef struct
{
    QString uid_me;
}InfoSyncRequestSend;

typedef struct
{
    QString uid_group_request;

}MessageHistoryRequestSend;
typedef struct
{

}CreateGroup;
typedef struct
{
   QString gid_group;
   QString uid_friend_need_add;
}PullGroup;
typedef struct
{
    QString gid;

}AddToGroup;

typedef struct
{
    QString uid_friend_invate;
    QString gid_invate;
    bool is_agree;

}AgreeToGroupStatus;

typedef struct
{
    QString uid_friend;
    bool is_agree;
}AgreeToAddFriendStatus;


//Accept from server,after type switch
typedef struct
{
    QString uid_me;
}RegisterSuccessAcc;
typedef struct
{

}LoginSuccessAcc;
//assciation_num(n个联系，下行n个包)
typedef struct
{
    QString uid_group;
    QString name_assciation;
    QMap<QString,QString> member_map;//<uid,name>
}InfoSyncSuccessAcc;
typedef struct
{

     QString uid_group;
     int message_num;
     QMap<QString ,QList<QString>> message;//<name,message_list>

}MessageHistorySyncAcc;

}


#endif // PACKAGE_H
